﻿<%@ Page Title="" Language="C#" MasterPageFile="~/uc/MemberIndex.Master"  AutoEventWireup="true" CodeBehind="shop_buyingLeads.aspx.cs" Inherits="ncp.Web.member.shop_buyingLeads" %>
<asp:Content ID="Content1" ContentPlaceHolderID="header" runat="server">
<title>求购信息-中国农业信息化服务商</title>

    <script src="/js/paging.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="background:#77a400;">
<div class="bh-con-right-h-yy-control"><a href="/member/001/article_add.html">添加求购</a></div>
<div class="bh-con-right-h-yy"><a href="#">店铺管理</a> > 求购信息</div>
</div>
<ul class="listTitle">
<li class="title">标题</li>
<li class="click">点击</li>
<li class="datetime">发布时间</li>
<li class="audit">审核</li>
<li class="operate">操作</li>
</ul>
<div class="bh-zzg-ny-cleftbr" style="width: 785px;">
    
        <div class="bh-zzg-ny-cleftbrt newslist">
      </div>
      <div id="paging" class="bh-zzg-ny-cleftbrbottom">

    </div>
</div>
<script type="text/javascript">
    var sorting = "News_Date";
    $("ul.sorting-btns a").click(function() {
        $("ul.sorting-btns a").removeClass("crt");
        $(this).addClass("crt");
        sorting = $(this).attr("sort");
        paging.query();
    });
    var paging;
    $(function() {
        paging = new Paging();
        paging.dataCount = 0;
        var response = ncp.Web.member.shop_buyingLeads.GetNewsCount();
        if (response.value != null) {
            var jsonOBJ = eval(response.value)[0];
            if (jsonOBJ.isreload) {
                paging.dataCount = jsonOBJ.msg;
            }
        }
        paging.loadPagingText();
        paging.query();
    });
    
    Paging.prototype.query = function() {
        var rep = ncp.Web.member.shop_buyingLeads.GetNewsList(paging.pageIndex - 1, paging.pageSize, sorting);
        if (rep.value != null) {
            var jsonOBJ = eval(rep.value)[0];
            if (jsonOBJ.isreload) {
                $(".newslist").html(jsonOBJ.msg);
                $(".newslist li").mouseover(function() {
                    $(this).children("div.toolstrip").show();
                }).mouseout(function() {
                    $(this).children("div.toolstrip").hide();
                });
            }
        }
    }
    function onDelete(id) {
        if (confirm("确定要删除这条记录吗？删除后将无法恢复！")) {
            var rep = ncp.Web.member.shop_buyingLeads.Delete(id);
            if (rep.value != null) {
                var jsonOBJ = eval(rep.value)[0];
                alert(jsonOBJ.msg);
                if (jsonOBJ.isreload) {
                    var response = ncp.Web.member.shop_buyingLeads.GetNewsCount();
                    if (response.value != null) {
                        jsonOBJ = eval(response.value)[0];
                        if (jsonOBJ.isreload) {
                            paging.dataCount = jsonOBJ.msg;
                        }
                    }
                    paging.loadPagingText();
                    paging.query();
                }
            }
        }
    }
    $(function() {
        paging.query();
        
    });
      </script>
</asp:Content>
